﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace ShootSearch.Util
{
    public class ExpandableConverter<T>:ExpandableObjectConverter
    {
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
        {
            if (destType == typeof(string) && value is T)
            {
                return value.ToString();
            }
            return base.ConvertTo(context, culture, value, destType);
        }
    }

}
